/*
 * XML Type:  Path
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.Path
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML Path(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class PathImpl extends org.isistan.flabot.coremodelEcore.impl.NamedElementModelImpl implements org.isistan.flabot.coremodelEcore.Path
{
    private static final long serialVersionUID = 1L;
    
    public PathImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName NODES$0 = 
        new javax.xml.namespace.QName("", "nodes");
    private static final javax.xml.namespace.QName ENDNODES$2 = 
        new javax.xml.namespace.QName("", "endNodes");
    private static final javax.xml.namespace.QName STARTNODES$4 = 
        new javax.xml.namespace.QName("", "startNodes");
    private static final javax.xml.namespace.QName ENDNODES2$6 = 
        new javax.xml.namespace.QName("", "endNodes");
    private static final javax.xml.namespace.QName STARTNODES2$8 = 
        new javax.xml.namespace.QName("", "startNodes");
    private static final javax.xml.namespace.QName NODES2$10 = 
        new javax.xml.namespace.QName("", "nodes");
    
    
    /**
     * Gets array of all "nodes" elements
     */
    public org.isistan.flabot.coremodelEcore.PathNode[] getNodesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(NODES2$10, targetList);
            org.isistan.flabot.coremodelEcore.PathNode[] result = new org.isistan.flabot.coremodelEcore.PathNode[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "nodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode getNodesArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(NODES2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "nodes" element
     */
    public int sizeOfNodesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(NODES2$10);
        }
    }
    
    /**
     * Sets array of all "nodes" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setNodesArray(org.isistan.flabot.coremodelEcore.PathNode[] nodesArray)
    {
        check_orphaned();
        arraySetterHelper(nodesArray, NODES2$10);
    }
    
    /**
     * Sets ith "nodes" element
     */
    public void setNodesArray(int i, org.isistan.flabot.coremodelEcore.PathNode nodes)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(NODES2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(nodes);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "nodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode insertNewNodes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().insert_element_user(NODES2$10, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "nodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode addNewNodes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().add_element_user(NODES2$10);
            return target;
        }
    }
    
    /**
     * Removes the ith "nodes" element
     */
    public void removeNodes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(NODES2$10, i);
        }
    }
    
    /**
     * Gets array of all "endNodes" elements
     */
    public org.isistan.flabot.coremodelEcore.PathNode[] getEndNodesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ENDNODES2$6, targetList);
            org.isistan.flabot.coremodelEcore.PathNode[] result = new org.isistan.flabot.coremodelEcore.PathNode[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "endNodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode getEndNodesArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(ENDNODES2$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "endNodes" element
     */
    public int sizeOfEndNodesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ENDNODES2$6);
        }
    }
    
    /**
     * Sets array of all "endNodes" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setEndNodesArray(org.isistan.flabot.coremodelEcore.PathNode[] endNodesArray)
    {
        check_orphaned();
        arraySetterHelper(endNodesArray, ENDNODES2$6);
    }
    
    /**
     * Sets ith "endNodes" element
     */
    public void setEndNodesArray(int i, org.isistan.flabot.coremodelEcore.PathNode endNodes)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(ENDNODES2$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(endNodes);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "endNodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode insertNewEndNodes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().insert_element_user(ENDNODES2$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "endNodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode addNewEndNodes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().add_element_user(ENDNODES2$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "endNodes" element
     */
    public void removeEndNodes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ENDNODES2$6, i);
        }
    }
    
    /**
     * Gets array of all "startNodes" elements
     */
    public org.isistan.flabot.coremodelEcore.PathNode[] getStartNodesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(STARTNODES2$8, targetList);
            org.isistan.flabot.coremodelEcore.PathNode[] result = new org.isistan.flabot.coremodelEcore.PathNode[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "startNodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode getStartNodesArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(STARTNODES2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "startNodes" element
     */
    public int sizeOfStartNodesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(STARTNODES2$8);
        }
    }
    
    /**
     * Sets array of all "startNodes" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setStartNodesArray(org.isistan.flabot.coremodelEcore.PathNode[] startNodesArray)
    {
        check_orphaned();
        arraySetterHelper(startNodesArray, STARTNODES2$8);
    }
    
    /**
     * Sets ith "startNodes" element
     */
    public void setStartNodesArray(int i, org.isistan.flabot.coremodelEcore.PathNode startNodes)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(STARTNODES2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(startNodes);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "startNodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode insertNewStartNodes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().insert_element_user(STARTNODES2$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "startNodes" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode addNewStartNodes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().add_element_user(STARTNODES2$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "startNodes" element
     */
    public void removeStartNodes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(STARTNODES2$8, i);
        }
    }
    
    /**
     * Gets the "endNodes" attribute
     */
    public java.lang.String getEndNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENDNODES2$6);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "endNodes" attribute
     */
    public org.apache.xmlbeans.XmlString xgetEndNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENDNODES2$6);
            return target;
        }
    }
    
    /**
     * True if has "endNodes" attribute
     */
    public boolean isSetEndNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ENDNODES2$6) != null;
        }
    }
    
    /**
     * Sets the "endNodes" attribute
     */
    public void setEndNodes2(java.lang.String endNodes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENDNODES2$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ENDNODES2$6);
            }
            target.setStringValue(endNodes2);
        }
    }
    
    /**
     * Sets (as xml) the "endNodes" attribute
     */
    public void xsetEndNodes2(org.apache.xmlbeans.XmlString endNodes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENDNODES2$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENDNODES2$6);
            }
            target.set(endNodes2);
        }
    }
    
    /**
     * Unsets the "endNodes" attribute
     */
    public void unsetEndNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ENDNODES2$6);
        }
    }
    
    /**
     * Gets the "startNodes" attribute
     */
    public java.lang.String getStartNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTNODES2$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "startNodes" attribute
     */
    public org.apache.xmlbeans.XmlString xgetStartNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(STARTNODES2$8);
            return target;
        }
    }
    
    /**
     * True if has "startNodes" attribute
     */
    public boolean isSetStartNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(STARTNODES2$8) != null;
        }
    }
    
    /**
     * Sets the "startNodes" attribute
     */
    public void setStartNodes2(java.lang.String startNodes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTNODES2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STARTNODES2$8);
            }
            target.setStringValue(startNodes2);
        }
    }
    
    /**
     * Sets (as xml) the "startNodes" attribute
     */
    public void xsetStartNodes2(org.apache.xmlbeans.XmlString startNodes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(STARTNODES2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(STARTNODES2$8);
            }
            target.set(startNodes2);
        }
    }
    
    /**
     * Unsets the "startNodes" attribute
     */
    public void unsetStartNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(STARTNODES2$8);
        }
    }
    
    /**
     * Gets the "nodes" attribute
     */
    public java.lang.String getNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NODES2$10);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "nodes" attribute
     */
    public org.apache.xmlbeans.XmlString xgetNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NODES2$10);
            return target;
        }
    }
    
    /**
     * True if has "nodes" attribute
     */
    public boolean isSetNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(NODES2$10) != null;
        }
    }
    
    /**
     * Sets the "nodes" attribute
     */
    public void setNodes2(java.lang.String nodes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NODES2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NODES2$10);
            }
            target.setStringValue(nodes2);
        }
    }
    
    /**
     * Sets (as xml) the "nodes" attribute
     */
    public void xsetNodes2(org.apache.xmlbeans.XmlString nodes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NODES2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NODES2$10);
            }
            target.set(nodes2);
        }
    }
    
    /**
     * Unsets the "nodes" attribute
     */
    public void unsetNodes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(NODES2$10);
        }
    }
}
